package arraysUtilClassCommonMethods;

import java.util.Arrays;

/**
 * @ClassName ArraysToString
 * @Description 数组转为字符串
 * @Author 李明忠
 * @Date 2025/5/28 18:35
 * @Version 1.0
 */
@SuppressWarnings("all")
public class ArraysToString {
    public static void main(String[] args) {
        //定义一个数组
        int[] arr = {1, 2, 3, 4, 5};
        //将数组转为字符串并输出
        String str = Arrays.toString(arr);
        System.out.println(str);
        System.out.println("=============");
        System.out.println(Arrays.toString(arr));
    }
}
